<template>
  <div class="toast" v-if="isShow">
    <div class="toast-div">{{ text }}</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      text: '内sdsd容',
      isShow: true,
      duration: 1500
    }
  },
  mounted() {
  }
}
</script>

<style>
  * {
    margin: 0;
    padding: 0;
  }

  .toast {
    position: fixed;
    top: 50%;
    left: 50%;
    display: flex;
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    border-radius: 5px;
    padding: 8px 20px;
    transform: translate3d(-50%, -50%, 0);
    background-color: rgba(0, 0, 0, .7);
  }
</style>
